package com.big.codegen.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.big.common.mybatis.base.domain.entity.FlagBaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 数据源实体
 *
 * @author 山归岿
 * @create 2025-01-03
 */
@Data
@TableName("datasource")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "数据源实体")
public class Datasource extends FlagBaseEntity {

    /**
     * 数据源名称
     */
    @Schema(description = "数据源名称")
    private String name;

    /**
     * 主机地址
     */
    @Schema(description = "主机地址")
    private String host;

    /**
     * 端口
     */
    @Schema(description = "端口")
    private String port;

    /**
     * 数据库类型
     */
    @Schema(description = "数据库类型")
    @TableField("db_type")
    private String dbType;

    /**
     * 数据库驱动
     */
    @Schema(description = "数据库驱动")
    @TableField("driver_class_name")
    private String driverClassName;

    /**
     * 数据库连接URL
     */
    @Schema(description = "数据库连接URL")
    private String url;

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    private String username;

    /**
     * 密码
     */
    @Schema(description = "密码")
    private String password;

    /**
     * 数据库名
     */
    @Schema(description = "数据库名")
    @TableField("database_name")
    private String databaseName;

    /**
     * 状态 (1: 启用, 0: 禁用)
     */
    @Schema(description = "状态 (1: 启用, 0: 禁用)")
    private Integer status;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;
}